package com.bruan.threadapi;

public class ThreadTest {
    public static void main(String[] args) {
        Thread t1 = new MyThread();
        t1.start();
        Thread t2 = new MyThread();
        t2.start();
        System.out.println(t1.getName());
        System.out.println(t2.getName());

        //主线程对象名字获取
        Thread m = Thread.currentThread();
        System.out.println(m);
        for (int i = 0; i < 10; i++) {
            System.out.println("主线程++++");
        }
    }
}
